<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //环保知识
        Schema::create('comment', function (Blueprint $table) {
            $table->increments('id');
            $table -> integer('classify_id')->default(0)->comment('分类id');
            $table -> string('realname')->nullable()->comment('姓名');
            $table -> string('position')->nullable()->comment('职位');
            $table -> integer('photo_id')->default(0)->comment('头像');
            $table -> string("desc")->nullable()->comment('描述');
            $table -> text('content')->nullable()->comment('内容');
            $table -> softDeletes();
            $table->timestamps();
        });

        Schema::create('en_comment', function (Blueprint $table) {
            $table->increments('id');
            $table -> integer('classify_id')->default(0)->comment('分类id');
            $table -> string('realname')->nullable()->comment('姓名');
            $table -> string('position')->nullable()->comment('职位');
            $table -> integer('photo_id')->default(0)->comment('头像');
            $table -> string("desc")->nullable()->comment('描述');
            $table -> text('content')->nullable()->comment('内容');
            $table -> softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
